<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>唯品会倒计时</title>
		<style type="text/css">
			*{
				margin:0;
				padding:0;
			}
			#box{
				width: 1349px;
				height: 666px;
				background: url(img/imgvip/vipt1.jpg);
				padding: 0.1px;
				font-family: "微软雅黑";
			}
			#box #count{
				width: 350px;
				height: 32px;
				margin: 180px 0 0 545px;
				line-height: 32px;
			}
			#box #count span{
				font-size: 30px;
				font-weight: bolder;
				color: #c89a1c;
				margin: 0 10px 0 10px;
			}
			#box #count span#cgif{
				display: inline-block;
				width: 20px;
				height: 30px;
				background: url(img/imgvip/msecond_g.b851c691.gif) no-repeat center center;
			}
			#box #count em{
				font-style: normal;
				font-size: 16px;
				/*line-height: 32px;*/ 
				margin: 0 8px 0 0;
				/*display: inline-block;*/
			}
			
		</style>
	</head>
	<body>
		<div id="box">
			<div id="count">
				<span id="cday"></span><em>天</em>
				<span id="chour"></span><em>时</em>
				<span id="cminute"></span><em>分</em>
				<span id="csecond"></span><em>秒</em>
				<span id="cgif"></span>
			</div>
		</div>
	</body>
</html>

<script type="text/javascript">
	countDown();
	function countDown(){
		var endTime=new Date("2016/09/15 00:00:00");//截止日期
		var nowTime=new Date();//当前时间
		var t=endTime.getTime()-nowTime.getTime();//获取毫秒数并做减法
		
		var d=Math.floor(t/1000/60/60/24);
		var h=Math.floor(t/1000/60/60%24);
		var m=Math.floor(t/1000/60%60);
		var s=Math.floor(t/1000%60);
		
		document.getElementById("cday").innerHTML=d;
		document.getElementById("chour").innerHTML=h;
		document.getElementById("cminute").innerHTML=m;
		document.getElementById("csecond").innerHTML=s;
	}
	var timer1=window.setInterval(countDown,1000);	
</script>
